# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Stas Rudakou <stas at garage22 dot net>

pkgname=cobalt
pkgver=0.19.0
pkgrel=1
pkgdesc='Static site generator written in Rust'
url='https://cobalt-org.github.io/'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('openssl' 'libsass' 'glibc' 'gcc-libs')
makedepends=('rust' 'cargo')
source=(https://github.com/cobalt-org/cobalt.rs/archive/v${pkgver}/${pkgname}.rs-v${pkgver}.tar.gz)
sha512sums=('6667355816e6304cc37b1729246284d5805abeb120fd78ad98420070f165ca55bf5682ad875a2191f3764d4f12e9c8fbd9901e84febeee9bd46eb9b821cd7068')
b2sums=('d99f09b5764339acdadae5142e429070c5634494538c0aa8a72e6f48114fbba0a12873c1a9abeb121877dcfd43b4c0b87df5f04c589c40ffc64cdd1fbd43d846')

build() {
  cd ${pkgname}.rs-${pkgver}
  cargo build --release --features 'syntax-highlight sass'
}

check() {
  cd ${pkgname}.rs-${pkgver}
  cargo test --release --locked
}

package() {
  cd ${pkgname}.rs-${pkgver}
  install -Dm 755 target/release/cobalt -t "${pkgdir}/usr/bin"
  install -Dm 644 LICENSE-MIT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
